package com.lean.android.ad.repository.service

import com.lean.android.ad.repository.model.AdEventRequestBody
import com.lean.android.ad.repository.model.AdSwitchInfo
import com.lean.android.network.ApiResponse
import retrofit2.http.Body
import retrofit2.http.POST

interface AdApiService {

    /**
     * 加载广告配置
     */
    @POST("/api/ad_switch")
    suspend fun loadAdInfo(): ApiResponse<AdSwitchInfo>

    /**
     * 上报使用时长
     */
    @POST("/api/active_time")
    suspend fun reportAppDuration(@Body params: HashMap<String, Long>): ApiResponse<Any>

    /**
     * 上报广告日志
     */
    @POST("/api/ad_log")
    suspend fun reportAdEvent(@Body event: AdEventRequestBody): ApiResponse<Any>


}